<html>
    <head>
        <title>Map:State:crs</title>
        <!-- leaflet的css样式 -->
        <link rel="stylesheet" href="../lib/leaflet.css" />
        <!-- leaflet的js库 -->
        <script type="text/javascript" src="../lib/leaflet-src.js"></script>
        <!-- 地图容器样式 -->
        <style>
            #mapDiv{
                width: 100%;
                height: 100%;
            }
        </style>
    </head>
    <body onload="init()">
        <p>地图显示空间参考</p>
        <!--地图的容器-->
        <div id="mapDiv"></div>
    </body>
</html>

<script type="text/javascript">
    var map = null; 

    function init(){

        map = L.map("mapDiv", { 
            crs: L.CRS.EPSG4326     //将默认crs改为WGS84
        }).setView([0,0], 1);

        L.tileLayer( 
            'http://{s}.tile.osm.org/{z}/{x}/{y}.png'
        ).addTo(map);
    }
</script>
    


